home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX 6.2 Applications 1996 May
/
SGI IRIX 6.2 Applications 1996 May.iso
/
dist
/
impr_dev.idb
/
usr
/
impressario
/
src
/
gui_models
/
laserjetPJL
/
Makefile.z
/
Makefile
Wrap
Makefile
|
1996-05-06
|
8KB
|
190 lines
#! smake
#*************************************************************************
# Copyright (c) 1993 Silicon Graphics, Inc.
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the name of
# Silicon Graphics may not be used in any advertising or publicity relating
# to the software without the specific, prior written permission of Silicon
# Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
# INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
# RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF
# THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# SILICON GRAPHICS RESERVES THE RIGHT TO CHANGE FUTURE VERSIONS OF THIS
# SOFTWARE IN ANY MANNER AND AT ANY TIME WITHOUT PRIOR NOTICE.
#*************************************************************************
#
# Makefile - Graphical model file for HP LaserJet printers.
#
# This file builds the sample gui_model program source into an
# executable gui_model. The model file follows SGI conventions for
# building programs. To successfully build a gui_model program
# the development workstation must have the X11 and Motif
# development environment installed.
#
# If, as recommended, you develop your gui_model simply by modifying
# the example source code provided in this directory, you will only
# need to change the name of the executable gui_model program produced
# by this Makefile. This name is specified by the variable TARGETS
# and is described below.
#
# Refer to the README file in this directory for information
# on the gui_model source code files. Refer to the gui_model
# specification in /usr/impressario/doc for background information
# on the gui_model program.
#
# Note that this Makefile uses the parallel make program 'smake'.
# To use 'make' remove the "! smake" from the first line of this file
# leaving only the '#'.
#
# If you wish to compile the example code with the EXAMPLE_ADD
# flag, uncomment the second LCDEFS line. Leave the first LCDEFS
# line uncommented at all times.
#
# $Revision: 1.2 $
#
#*************************************************************************
#
# The commondefs file contains a number of useful macros and provides
# a Makefile framework. The commondefs file along with the $(COMMONRULES)
# file that it defines allow the developer to create simple, consistent and
# extremely useful Makefiles without the need to write a complex Makefile
# constructions. You are encouraged to read the /usr/include/make/commondefs
# file to learn more about the services it provides.
#
include /usr/include/make/commondefs
#
# NOTE TO DEVELOPER: IF YOU HAVE ONLY MADE MODIFICATIONS TO THE SOURCE
# FILES IN THIS DIRECTORY AND HAVE NOT ADDED OR REMOVED ANY SOURCE
# FILES ALL YOU NEED TO CHANGE IN THIS FILE IS THE VALUE OF THE
# TARGETS and APP_DEFS VARIABLE.
#
# TARGETS should be set to the name you wish to give your executable
# gui_model file program. The base name of the target MUST be the same
# as the name of the printer's model file located in /var/spool/lp/model.
# The suffix MUST be '.gui' must be added to this base target name.
#
# APP_DEFS should be the name of the program app defaults file. Note
# that the name of app defaults file must match the name assigned to
# GUI_CLASS in the file gui_class.h (this value must also match the
# string assigned to GUI_CLASS in the printer model file).
#
TARGETS = laserjet_model.gui
APP_DEFS = LaserJet
#
# These are the C language source files that comprise the gui_model
# program. Refer to the commondefs/commonrules files for source
# file variables names (e.g. AFILES, C++FILES, etc.). If you add
# or remove source files from your gui_model program you must make
# the corresponding changes to this list.
#
CFILES = main.c \
general_opts.c \
ps_opts.c \
image_opts.c \
text_opts.c \
util.c \
resource.c
#
# These are commond-line flags to the C compiler and linker.
# Refer to the cc man page for details on the meaning of the
# switches. Refer to the commondefs file for information on
# on the meaning and use of the variables.
#
LCDEFS = -DFUNCPROTO -DNARROWPROTO -DNeedFunctionPrototypes
# Uncomment next line for example option.
#LCDEFS += -DEXAMPLE_ADD
LCOPTS = -fullwarn
LLDLIBS = -lXm -lXt -lX11 -lpod -lspool -lgen
#
# This variable specifies the standards compliance level of
# the compilation. Typical values for this variable are -xansi
# for ANSI C compliant compiles and -cckr for K&R compilation.
# Refer to the cc man page for information on compliance level
# switches and commondefs for the use of this variable.
#
CVERSION = -xansi
#
# This set the optimization level for the C compiler. Refer to
# the cc man page for details. If you wish to build a debugable
# version of your program you can either change this variable
# to -g or invoke the make as:
#
# make OPTIMIZER=-g
#
OPTIMIZER=-O2
#
# This is the default build target. If you simply type 'make',
# this target will be executed. First an incremental depend is
# run. This simply parses the source code files for #include's
# and makes note of the files dependency on a given header file.
# Next make is invoked recursively to actually build the program
# specified by TARGETS. We recursively invoke make because when
# we do a parallel make (i.e. use smake) this recursive invocation
# ensures that we perform the incdepend first and the building of
# the program after that. If we did not use this construct, the
# incdepend would happen in parallel with the building of the
# program. This would lead to undersireable results. Note that we
# pass the value of OPTIMIZER to the recursive invocation of make
# so that this invocation remembers what OPTIMIZER has been set to.
# This is needed if OPTIMIZER is specified on the make command-line
#
default all: $(TARGETS)
#
# The commondefs file defines a variable COMMONRULES. This
# variable is set to the pathname of the commonrules file.
# The commonrules file should be included after the definition
# of the default target. The commonrules file defines a number
# standard targets (e.g. clobber, clean). Refer to the
# /usr/include/make/commonrules file for details.
#
include $(COMMONRULES)
#
# The OBJECTS variable is automatically set to be the .o's
# corresponding to the CFILES specified above. These .o's will
# be built using built-in compilation rules. The line below links
# these OBJECTS into the executable specified by TARGETS.
#
$(TARGETS): $(OBJECTS)
$(CCF) $(OBJECTS) $(LDFLAGS) -o $@
#
# Typically the install target builds the program and then installs
# it in the directory where it will be distributed. For example,
# you might be building your gui_model program in the directory
# /usr/people/foo/myprog but the program will live in
# /var/spool/lp/gui_model if built on a IRIX 4.X system or
# /var/spool/lp/gui_model/ELF if built on an IRIX 5.X system.
# The install(1) program can be invoked by this install rule to place
# the program in the distribution directory.
#
install: all
# Install the graphical option program (for IRIX 5.X build)
$(INSTALL) -m 755 -u lp -g lp \
-F /var/spool/lp/gui_model/ELF $(TARGETS)
# Install the graphical option program (for IRIX 4.X build)
# $(INSTALL) -m 755 -u lp -g lp \
# -F /var/spool/lp/gui_model $(TARGETS)
# Install the app-defaults file
$(INSTALL) -m 644 -F /usr/lib/X11/app-defaults \
$(APP_DEFS)